﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CNVP.JShop.UI;
using CNVP.JShop.BLL;

namespace CNVP.JShop.Admin.Template.Operate
{
    public partial class UnitSetting : AdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!BLL.BLLCheckAdmin.LoginOk(Page, 102) || !BLL.BLLCheckAdmin.LoginOk(Page, 118) || !BLL.BLLCheckAdmin.LoginOk(Page, 119)) return;//判断页面权限
            CNVP.JShop.BLL.CNVP_UnitsInfo bll = new CNVP.JShop.BLL.CNVP_UnitsInfo();
            string _UnitID = Request.Params["UnitID"];
            string _FormUnitID = Request.Params["OldUnitID"];
            string _Action = Request.Params["Action"];
            switch (_Action)
            {
                case "UnitDel":
                    bll.DelUnitStyle(Convert.ToInt32(_UnitID));
                    break;
                case "UnitX":
                    bll.CutUnitStyle(Convert.ToInt32(_FormUnitID), Convert.ToInt32(_UnitID));
                    break;
                case "UnitC":
                    bll.CopyUnitStyle(Convert.ToInt32(_FormUnitID), Convert.ToInt32(_UnitID));
                    break;
            }
        }
    }
}